package com.eight.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * @author 郭坤
 * @since 2023-02-24
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="couponHistory", description="优惠卷使用记录实体类")
@TableName(value = "coupon_history")
@Accessors(chain = true)
public class CouponHistory implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    @TableField(value = "id")
    private Long id;

    @ApiModelProperty("优惠卷名称")
    @TableField(value = "coupon_id")
    private String couponId;

    @ApiModelProperty("用户账号")
    @TableField(value = "customer_name")
    private String customerName;

    @ApiModelProperty("获取类型")
    @TableField(value = "get_type")
    private Integer getType;

    @ApiModelProperty("获取时间")
    @TableField(value = "create_time")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime createTime;

    @ApiModelProperty("使用状态")
    @TableField(value = "use_status")
    private Integer useStatus;

}
